package com.studentstreet.tools;

import java.util.Comparator;

import com.studentstreet.entities.SellerEntity;

public class SortByRank implements Comparator {
	@Override
	public int compare(Object one, Object another) {
		SellerEntity seller1 = (SellerEntity) one;
		SellerEntity seller2 = (SellerEntity) another;
		if (seller1.getRank() < seller2.getRank())
			return 1;
		else if (seller1.getRank() > seller2.getRank()) {
			return -1;
		}
		return 0;
	}

}
